import request from '@/utils/request'

export function getData(params) {
  return request({
    url: '/portal/scene/report',
    method: 'get',
    params
  })
}

export function getExcel(params) {
  return request({
    url: '/admin/debug/data',
    method: 'get',
    params
  })
}

export function getOutdoorAirRealTime() {
  return request({
    url: '/iot/data/get_outdoor_air_real_time',
    method: 'get'
  })
}

export function getIndoorAirRealTime() {
  return request({
    url: '/iot/data/get_indoor_air_real_time',
    method: 'get'
  })
}

export function getSoilRealTime() {
  return request({
    url: '/iot/data/get_soil_real_time',
    method: 'get'
  })
}

export function getErrorData(params) {
  return request({
    url: '/iot/data/get_error_data',
    method: 'get',
    params
  })
}

export function get_error_by_day(params) {
  return request({
    url: '/iot/data/get_error_by_day',
    method: 'get',
    params
  })
}

export function get_all_device(params) {
  return request({
    url: '/iot/data/get_all_device',
    method: 'get',
    params
  })
}

export function get_device_list(params) {
  return request({
    url: '/iot/data/get_device_list',
    method: 'get',
    params
  })
}
